#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;

int main() {
    unsigned int x; cin >> x;
    int ans = 0;
    while (x) {
        if (x & 1) ans++;
        x >>= 1;
    }
    cout << ans << endl;
    return 0;
}